package com.ww.springboot.boot.util.utilTest;

import cn.hutool.core.io.FileUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.google.common.collect.Lists;
import com.ww.springboot.boot.utils.Func;
import org.apache.commons.io.IOUtils;
import org.springframework.core.io.ClassPathResource;

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-01-10 15:11
 */
public class ExcelDemo {

    public static void main(String[] args) throws IOException {
        ExcelReader reader = ExcelUtil.getReader(new File("C:\\Users\\ZH500\\桌面\\test\\折扣比例.xlsx"));
        List<List<Object>> read = reader.read();


        ClassPathResource classPathResource = new ClassPathResource("/static/text/code.txt");
        String ids = IOUtils.toString(classPathResource.getInputStream(), "utf-8");

        FileUtil.writeBytes(ids.getBytes(),"C:\\Users\\ZH500\\桌面\\test\\sku.txt");
    }
}
